/*
 * @Author: ls
 * @Date: 2020-09-01 18:23:09
 * @LastEditTime: 2020-09-16 14:23:37
 * @LastEditors: Please set LastEditors
 * @Description: 基础细胞类
 * @FilePath: \snake\assets\cell.js
 */

cc.Class({
    extends: cc.Component,

    properties: {},

    onLoad() {},

    /**
     * @param {*} cellColor
     */
    setCellColor(cellColor = new cc.color(255, 255, 255, 255)) {
        this.node.getChildByName('color').color = cellColor;
    },

    /**
     * @param {*} cellSize
     */
    setCellPos(cellSize = new cc.v2(20, 20)) {
        this.node.width = cellSize.x;
        this.node.height = cellSize.y;
    },
});
